Fix thrashing detection and update readme to be correct - #102
Open
oscardssmith wants to merge 4 commits into
Open
Fix thrashing detection and update readme to be correct#102oscardssmith wants to merge 4 commits into
oscardssmith wants to merge 4 commits into
Conversation
Collaborator
Author
|
@gbaraldi any idea what's up with the CI here? |
Collaborator
Author
|
@gbaraldi or @topolarity any idea why CI is broken here? |
The "max heap" column came from `gc_num().max_memory`, which counts only what the GC charged itself and so misses everything else the process actually paid for: the mapped sysimage, code, stacks, malloc'd memory, and any heap a GC mapped without charging. On the bigint/pollard benchmark the two differ by more than 3x (202 MB accounted vs 643 MB resident). Record `Sys.maxrss()` in the child instead (getrusage `ru_maxrss`, peak resident set size), which counts only pages the OS actually backed with physical memory -- so an allocator that reserves address space it never touches is not penalised. Reported as "max rss" in the table, the JSON, and results.csv. Also size the repeated results.csv columns by the number of runs that produced results rather than by the requested run count: a run whose child dies is skipped, and the mismatched column length would then throw instead of reporting the runs that did succeed.
At 50M points a single run takes roughly 20 minutes, which dominates the whole `slow` class -- the other benchmark in it, bigint/pidigits, takes 30 seconds. Default to 10M and read `GCBENCH_RB_TREE_N` for the original scale. What this benchmark exists to measure is mark performance on a pointer graph whose minimum linear arrangement is expensive, i.e. mark doing random access with no prefetching; at 10M points the live set is still over a gigabyte of Point plus red-black-tree nodes, far beyond any cache or TLB, so that behaviour is intact.
oscardssmith
force-pushed
the
os/fix-reliability
branch
from
August 27, 2026 03:05
93e186d to
b7e738f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The thrashing detection here was very over-eager (it checked for 3 triggers in 10 seconds but when triggers happen they are likely to happen multiple times in short succession, so we now have a small timeout before logging subsequent thrashing).
This also fixes the previous behavior where if thrashing was detected it would exit noncleanly. Now it logs and moves on.
Lastly updated the readme to include all the options.